xen/sched: introduce cpupool_update_node_affinity()
authorJuergen Gross <jgross@suse.com>
Tue, 11 Oct 2022 12:59:40 +0000 (14:59 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 11 Oct 2022 12:59:40 +0000 (14:59 +0200)
commitd4e971ad12dd27913dffcf96b5de378ea7b476e1
treeb6bfe6737bb7d449e6825c96fb855e34dfa8ee83
parente8882bcfe35520e950ba60acd6e67e65f1ce90a8
xen/sched: introduce cpupool_update_node_affinity()

For updating the node affinities of all domains in a cpupool add a new
function cpupool_update_node_affinity().

In order to avoid multiple allocations of cpumasks carve out memory
allocation and freeing from domain_update_node_affinity() into new
helpers, which can be used by cpupool_update_node_affinity().

Modify domain_update_node_affinity() to take an additional parameter
for passing the allocated memory in and to allocate and free the memory
via the new helpers in case NULL was passed.

This will help later to pre-allocate the cpumasks in order to avoid
allocations in stop-machine context.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: a83fa1e2b96ace65b45dde6954d67012633a082b
master date: 2022-09-05 11:42:30 +0100
xen/common/sched/core.c
xen/common/sched/cpupool.c
xen/common/sched/private.h
xen/include/xen/sched.h